3.4.99 \(\int x^2 (d+e x^r)^3 (a+b \log (c x^n)) \, dx\) [399]

Optimal. Leaf size=148 \[ -\frac {1}{9} b d^3 n x^3-\frac {b e^3 n x^{3 (1+r)}}{9 (1+r)^2}-\frac {3 b d^2 e n x^{3+r}}{(3+r)^2}-\frac {3 b d e^2 n x^{3+2 r}}{(3+2 r)^2}+\frac {1}{3} \left (d^3 x^3+\frac {e^3 x^{3 (1+r)}}{1+r}+\frac {9 d^2 e x^{3+r}}{3+r}+\frac {9 d e^2 x^{3+2 r}}{3+2 r}\right ) \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-1/9*b*d^3*n*x^3-1/9*b*e^3*n*x^(3+3*r)/(1+r)^2-3*b*d^2*e*n*x^(3+r)/(3+r)^2-3*b*d*e^2*n*x^(3+2*r)/(3+2*r)^2+1/3
*(d^3*x^3+e^3*x^(3+3*r)/(1+r)+9*d^2*e*x^(3+r)/(3+r)+9*d*e^2*x^(3+2*r)/(3+2*r))*(a+b*ln(c*x^n))

________________________________________________________________________________________

Rubi [A]
time = 0.26, antiderivative size = 148, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {276, 2371, 12, 14} \begin {gather*} \frac {1}{3} \left (d^3 x^3+\frac {9 d^2 e x^{r+3}}{r+3}+\frac {9 d e^2 x^{2 r+3}}{2 r+3}+\frac {e^3 x^{3 (r+1)}}{r+1}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{9} b d^3 n x^3-\frac {3 b d^2 e n x^{r+3}}{(r+3)^2}-\frac {3 b d e^2 n x^{2 r+3}}{(2 r+3)^2}-\frac {b e^3 n x^{3 (r+1)}}{9 (r+1)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*(d + e*x^r)^3*(a + b*Log[c*x^n]),x]

[Out]

-1/9*(b*d^3*n*x^3) - (b*e^3*n*x^(3*(1 + r)))/(9*(1 + r)^2) - (3*b*d^2*e*n*x^(3 + r))/(3 + r)^2 - (3*b*d*e^2*n*
x^(3 + 2*r))/(3 + 2*r)^2 + ((d^3*x^3 + (e^3*x^(3*(1 + r)))/(1 + r) + (9*d^2*e*x^(3 + r))/(3 + r) + (9*d*e^2*x^
(3 + 2*r))/(3 + 2*r))*(a + b*Log[c*x^n]))/3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2371

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IGtQ[m, 0]

Rubi steps

\begin {align*} \int x^2 \left (d+e x^r\right )^3 \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {1}{3} \left (d^3 x^3+\frac {e^3 x^{3 (1+r)}}{1+r}+\frac {9 d^2 e x^{3+r}}{3+r}+\frac {9 d e^2 x^{3+2 r}}{3+2 r}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac {1}{3} x^2 \left (d^3+\frac {9 d^2 e x^r}{3+r}+\frac {9 d e^2 x^{2 r}}{3+2 r}+\frac {e^3 x^{3 r}}{1+r}\right ) \, dx\\ &=\frac {1}{3} \left (d^3 x^3+\frac {e^3 x^{3 (1+r)}}{1+r}+\frac {9 d^2 e x^{3+r}}{3+r}+\frac {9 d e^2 x^{3+2 r}}{3+2 r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{3} (b n) \int x^2 \left (d^3+\frac {9 d^2 e x^r}{3+r}+\frac {9 d e^2 x^{2 r}}{3+2 r}+\frac {e^3 x^{3 r}}{1+r}\right ) \, dx\\ &=\frac {1}{3} \left (d^3 x^3+\frac {e^3 x^{3 (1+r)}}{1+r}+\frac {9 d^2 e x^{3+r}}{3+r}+\frac {9 d e^2 x^{3+2 r}}{3+2 r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{3} (b n) \int \left (d^3 x^2+\frac {9 d e^2 x^{2 (1+r)}}{3+2 r}+\frac {9 d^2 e x^{2+r}}{3+r}+\frac {e^3 x^{2+3 r}}{1+r}\right ) \, dx\\ &=-\frac {1}{9} b d^3 n x^3-\frac {b e^3 n x^{3 (1+r)}}{9 (1+r)^2}-\frac {3 b d^2 e n x^{3+r}}{(3+r)^2}-\frac {3 b d e^2 n x^{3+2 r}}{(3+2 r)^2}+\frac {1}{3} \left (d^3 x^3+\frac {e^3 x^{3 (1+r)}}{1+r}+\frac {9 d^2 e x^{3+r}}{3+r}+\frac {9 d e^2 x^{3+2 r}}{3+2 r}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.16, size = 159, normalized size = 1.07 \begin {gather*} \frac {1}{9} x^3 \left (3 b d^3 n \log (x)+d^3 \left (3 a-b n-3 b n \log (x)+3 b \log \left (c x^n\right )\right )+\frac {e^3 x^{3 r} \left (-b n+3 a (1+r)+3 b (1+r) \log \left (c x^n\right )\right )}{(1+r)^2}+\frac {27 d^2 e x^r \left (-b n+a (3+r)+b (3+r) \log \left (c x^n\right )\right )}{(3+r)^2}+\frac {27 d e^2 x^{2 r} \left (-b n+a (3+2 r)+b (3+2 r) \log \left (c x^n\right )\right )}{(3+2 r)^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*(d + e*x^r)^3*(a + b*Log[c*x^n]),x]

[Out]

(x^3*(3*b*d^3*n*Log[x] + d^3*(3*a - b*n - 3*b*n*Log[x] + 3*b*Log[c*x^n]) + (e^3*x^(3*r)*(-(b*n) + 3*a*(1 + r)
+ 3*b*(1 + r)*Log[c*x^n]))/(1 + r)^2 + (27*d^2*e*x^r*(-(b*n) + a*(3 + r) + b*(3 + r)*Log[c*x^n]))/(3 + r)^2 +
(27*d*e^2*x^(2*r)*(-(b*n) + a*(3 + 2*r) + b*(3 + 2*r)*Log[c*x^n]))/(3 + 2*r)^2))/9

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.28, size = 4027, normalized size = 27.21

method result size
risch \(\text {Expression too large to display}\) \(4027\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(d+e*x^r)^3*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)

[Out]

1/3*x^3*b*(2*e^3*r^2*(x^r)^3+9*d*e^2*r^2*(x^r)^2+9*e^3*r*(x^r)^3+2*d^3*r^3+18*d^2*e*r^2*x^r+36*d*e^2*r*(x^r)^2
+9*e^3*(x^r)^3+11*d^3*r^2+45*d^2*e*r*x^r+27*d*e^2*(x^r)^2+18*d^3*r+27*d^2*e*x^r+9*d^3)/(1+r)/(3+2*r)/(3+r)*ln(
x^n)-1/18*x^3*(-486*e^3*(x^r)^3*a-1458*d^2*e*x^r*a-1458*d*e^2*(x^r)^2*a-864*I*Pi*b*d^2*e*r^4*csgn(I*c)*csgn(I*
c*x^n)^2*x^r+132*I*Pi*b*d^3*r^5*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-729*I*Pi*b*d*e^2*csgn(I*c)*csg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2*(x^r)^3+3078*I*Pi*b*d*e^2*r^2*csgn(I*c*x^n)^3*(x^r)^2-120*I*Pi*b*e^3*r
^4*csgn(I*x^n)*csgn(I*c*x^n)^2*(x^r)^3-729*I*Pi*b*d^2*e*csgn(I*c)*csgn(I*c*x^n)^2*x^r-1836*I*Pi*b*d*e^2*r^3*cs
gn(I*c)*csgn(I*c*x^n)^2*(x^r)^2-1296*I*Pi*b*d^3...

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 224, normalized size = 1.51 \begin {gather*} -\frac {1}{9} \, b d^{3} n x^{3} + \frac {1}{3} \, b d^{3} x^{3} \log \left (c x^{n}\right ) + \frac {1}{3} \, a d^{3} x^{3} + \frac {b e^{3} x^{3 \, r + 3} \log \left (c x^{n}\right )}{3 \, {\left (r + 1\right )}} + \frac {3 \, b d e^{2} x^{2 \, r + 3} \log \left (c x^{n}\right )}{2 \, r + 3} + \frac {3 \, b d^{2} e x^{r + 3} \log \left (c x^{n}\right )}{r + 3} - \frac {b e^{3} n x^{3 \, r + 3}}{9 \, {\left (r + 1\right )}^{2}} + \frac {a e^{3} x^{3 \, r + 3}}{3 \, {\left (r + 1\right )}} - \frac {3 \, b d e^{2} n x^{2 \, r + 3}}{{\left (2 \, r + 3\right )}^{2}} + \frac {3 \, a d e^{2} x^{2 \, r + 3}}{2 \, r + 3} - \frac {3 \, b d^{2} e n x^{r + 3}}{{\left (r + 3\right )}^{2}} + \frac {3 \, a d^{2} e x^{r + 3}}{r + 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d+e*x^r)^3*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-1/9*b*d^3*n*x^3 + 1/3*b*d^3*x^3*log(c*x^n) + 1/3*a*d^3*x^3 + 1/3*b*e^3*x^(3*r + 3)*log(c*x^n)/(r + 1) + 3*b*d
*e^2*x^(2*r + 3)*log(c*x^n)/(2*r + 3) + 3*b*d^2*e*x^(r + 3)*log(c*x^n)/(r + 3) - 1/9*b*e^3*n*x^(3*r + 3)/(r +
1)^2 + 1/3*a*e^3*x^(3*r + 3)/(r + 1) - 3*b*d*e^2*n*x^(2*r + 3)/(2*r + 3)^2 + 3*a*d*e^2*x^(2*r + 3)/(2*r + 3) -
 3*b*d^2*e*n*x^(r + 3)/(r + 3)^2 + 3*a*d^2*e*x^(r + 3)/(r + 3)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 879 vs. \(2 (140) = 280\).
time = 0.37, size = 879, normalized size = 5.94 \begin {gather*} \frac {3 \, {\left (4 \, b d^{3} r^{6} + 44 \, b d^{3} r^{5} + 193 \, b d^{3} r^{4} + 432 \, b d^{3} r^{3} + 522 \, b d^{3} r^{2} + 324 \, b d^{3} r + 81 \, b d^{3}\right )} x^{3} \log \left (c\right ) + 3 \, {\left (4 \, b d^{3} n r^{6} + 44 \, b d^{3} n r^{5} + 193 \, b d^{3} n r^{4} + 432 \, b d^{3} n r^{3} + 522 \, b d^{3} n r^{2} + 324 \, b d^{3} n r + 81 \, b d^{3} n\right )} x^{3} \log \left (x\right ) - {\left (4 \, {\left (b d^{3} n - 3 \, a d^{3}\right )} r^{6} + 44 \, {\left (b d^{3} n - 3 \, a d^{3}\right )} r^{5} + 81 \, b d^{3} n + 193 \, {\left (b d^{3} n - 3 \, a d^{3}\right )} r^{4} - 243 \, a d^{3} + 432 \, {\left (b d^{3} n - 3 \, a d^{3}\right )} r^{3} + 522 \, {\left (b d^{3} n - 3 \, a d^{3}\right )} r^{2} + 324 \, {\left (b d^{3} n - 3 \, a d^{3}\right )} r\right )} x^{3} + {\left (3 \, {\left (4 \, b r^{5} + 40 \, b r^{4} + 153 \, b r^{3} + 279 \, b r^{2} + 243 \, b r + 81 \, b\right )} x^{3} e^{3} \log \left (c\right ) + 3 \, {\left (4 \, b n r^{5} + 40 \, b n r^{4} + 153 \, b n r^{3} + 279 \, b n r^{2} + 243 \, b n r + 81 \, b n\right )} x^{3} e^{3} \log \left (x\right ) + {\left (12 \, a r^{5} - 4 \, {\left (b n - 30 \, a\right )} r^{4} - 9 \, {\left (4 \, b n - 51 \, a\right )} r^{3} - 9 \, {\left (13 \, b n - 93 \, a\right )} r^{2} - 81 \, b n - 81 \, {\left (2 \, b n - 9 \, a\right )} r + 243 \, a\right )} x^{3} e^{3}\right )} x^{3 \, r} + 27 \, {\left ({\left (2 \, b d r^{5} + 19 \, b d r^{4} + 68 \, b d r^{3} + 114 \, b d r^{2} + 90 \, b d r + 27 \, b d\right )} x^{3} e^{2} \log \left (c\right ) + {\left (2 \, b d n r^{5} + 19 \, b d n r^{4} + 68 \, b d n r^{3} + 114 \, b d n r^{2} + 90 \, b d n r + 27 \, b d n\right )} x^{3} e^{2} \log \left (x\right ) + {\left (2 \, a d r^{5} - {\left (b d n - 19 \, a d\right )} r^{4} - 4 \, {\left (2 \, b d n - 17 \, a d\right )} r^{3} - 9 \, b d n - 2 \, {\left (11 \, b d n - 57 \, a d\right )} r^{2} + 27 \, a d - 6 \, {\left (4 \, b d n - 15 \, a d\right )} r\right )} x^{3} e^{2}\right )} x^{2 \, r} + 27 \, {\left ({\left (4 \, b d^{2} r^{5} + 32 \, b d^{2} r^{4} + 97 \, b d^{2} r^{3} + 141 \, b d^{2} r^{2} + 99 \, b d^{2} r + 27 \, b d^{2}\right )} x^{3} e \log \left (c\right ) + {\left (4 \, b d^{2} n r^{5} + 32 \, b d^{2} n r^{4} + 97 \, b d^{2} n r^{3} + 141 \, b d^{2} n r^{2} + 99 \, b d^{2} n r + 27 \, b d^{2} n\right )} x^{3} e \log \left (x\right ) + {\left (4 \, a d^{2} r^{5} - 4 \, {\left (b d^{2} n - 8 \, a d^{2}\right )} r^{4} - 9 \, b d^{2} n - {\left (20 \, b d^{2} n - 97 \, a d^{2}\right )} r^{3} + 27 \, a d^{2} - {\left (37 \, b d^{2} n - 141 \, a d^{2}\right )} r^{2} - 3 \, {\left (10 \, b d^{2} n - 33 \, a d^{2}\right )} r\right )} x^{3} e\right )} x^{r}}{9 \, {\left (4 \, r^{6} + 44 \, r^{5} + 193 \, r^{4} + 432 \, r^{3} + 522 \, r^{2} + 324 \, r + 81\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d+e*x^r)^3*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

1/9*(3*(4*b*d^3*r^6 + 44*b*d^3*r^5 + 193*b*d^3*r^4 + 432*b*d^3*r^3 + 522*b*d^3*r^2 + 324*b*d^3*r + 81*b*d^3)*x
^3*log(c) + 3*(4*b*d^3*n*r^6 + 44*b*d^3*n*r^5 + 193*b*d^3*n*r^4 + 432*b*d^3*n*r^3 + 522*b*d^3*n*r^2 + 324*b*d^
3*n*r + 81*b*d^3*n)*x^3*log(x) - (4*(b*d^3*n - 3*a*d^3)*r^6 + 44*(b*d^3*n - 3*a*d^3)*r^5 + 81*b*d^3*n + 193*(b
*d^3*n - 3*a*d^3)*r^4 - 243*a*d^3 + 432*(b*d^3*n - 3*a*d^3)*r^3 + 522*(b*d^3*n - 3*a*d^3)*r^2 + 324*(b*d^3*n -
 3*a*d^3)*r)*x^3 + (3*(4*b*r^5 + 40*b*r^4 + 153*b*r^3 + 279*b*r^2 + 243*b*r + 81*b)*x^3*e^3*log(c) + 3*(4*b*n*
r^5 + 40*b*n*r^4 + 153*b*n*r^3 + 279*b*n*r^2 + 243*b*n*r + 81*b*n)*x^3*e^3*log(x) + (12*a*r^5 - 4*(b*n - 30*a)
*r^4 - 9*(4*b*n - 51*a)*r^3 - 9*(13*b*n - 93*a)*r^2 - 81*b*n - 81*(2*b*n - 9*a)*r + 243*a)*x^3*e^3)*x^(3*r) +
27*((2*b*d*r^5 + 19*b*d*r^4 + 68*b*d*r^3 + 114*b*d*r^2 + 90*b*d*r + 27*b*d)*x^3*e^2*log(c) + (2*b*d*n*r^5 + 19
*b*d*n*r^4 + 68*b*d*n*r^3 + 114*b*d*n*r^2 + 90*b*d*n*r + 27*b*d*n)*x^3*e^2*log(x) + (2*a*d*r^5 - (b*d*n - 19*a
*d)*r^4 - 4*(2*b*d*n - 17*a*d)*r^3 - 9*b*d*n - 2*(11*b*d*n - 57*a*d)*r^2 + 27*a*d - 6*(4*b*d*n - 15*a*d)*r)*x^
3*e^2)*x^(2*r) + 27*((4*b*d^2*r^5 + 32*b*d^2*r^4 + 97*b*d^2*r^3 + 141*b*d^2*r^2 + 99*b*d^2*r + 27*b*d^2)*x^3*e
*log(c) + (4*b*d^2*n*r^5 + 32*b*d^2*n*r^4 + 97*b*d^2*n*r^3 + 141*b*d^2*n*r^2 + 99*b*d^2*n*r + 27*b*d^2*n)*x^3*
e*log(x) + (4*a*d^2*r^5 - 4*(b*d^2*n - 8*a*d^2)*r^4 - 9*b*d^2*n - (20*b*d^2*n - 97*a*d^2)*r^3 + 27*a*d^2 - (37
*b*d^2*n - 141*a*d^2)*r^2 - 3*(10*b*d^2*n - 33*a*d^2)*r)*x^3*e)*x^r)/(4*r^6 + 44*r^5 + 193*r^4 + 432*r^3 + 522
*r^2 + 324*r + 81)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(d+e*x**r)**3*(a+b*ln(c*x**n)),x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 5986 deep

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1588 vs. \(2 (140) = 280\).
time = 3.26, size = 1588, normalized size = 10.73 \begin {gather*} \frac {12 \, b d^{3} n r^{6} x^{3} \log \left (x\right ) + 108 \, b d^{2} n r^{5} x^{3} x^{r} e \log \left (x\right ) - 4 \, b d^{3} n r^{6} x^{3} + 12 \, b d^{3} r^{6} x^{3} \log \left (c\right ) + 108 \, b d^{2} r^{5} x^{3} x^{r} e \log \left (c\right ) + 132 \, b d^{3} n r^{5} x^{3} \log \left (x\right ) + 54 \, b d n r^{5} x^{3} x^{2 \, r} e^{2} \log \left (x\right ) + 864 \, b d^{2} n r^{4} x^{3} x^{r} e \log \left (x\right ) - 44 \, b d^{3} n r^{5} x^{3} + 12 \, a d^{3} r^{6} x^{3} - 108 \, b d^{2} n r^{4} x^{3} x^{r} e + 108 \, a d^{2} r^{5} x^{3} x^{r} e + 132 \, b d^{3} r^{5} x^{3} \log \left (c\right ) + 54 \, b d r^{5} x^{3} x^{2 \, r} e^{2} \log \left (c\right ) + 864 \, b d^{2} r^{4} x^{3} x^{r} e \log \left (c\right ) + 579 \, b d^{3} n r^{4} x^{3} \log \left (x\right ) + 12 \, b n r^{5} x^{3} x^{3 \, r} e^{3} \log \left (x\right ) + 513 \, b d n r^{4} x^{3} x^{2 \, r} e^{2} \log \left (x\right ) + 2619 \, b d^{2} n r^{3} x^{3} x^{r} e \log \left (x\right ) - 193 \, b d^{3} n r^{4} x^{3} + 132 \, a d^{3} r^{5} x^{3} - 27 \, b d n r^{4} x^{3} x^{2 \, r} e^{2} + 54 \, a d r^{5} x^{3} x^{2 \, r} e^{2} - 540 \, b d^{2} n r^{3} x^{3} x^{r} e + 864 \, a d^{2} r^{4} x^{3} x^{r} e + 579 \, b d^{3} r^{4} x^{3} \log \left (c\right ) + 12 \, b r^{5} x^{3} x^{3 \, r} e^{3} \log \left (c\right ) + 513 \, b d r^{4} x^{3} x^{2 \, r} e^{2} \log \left (c\right ) + 2619 \, b d^{2} r^{3} x^{3} x^{r} e \log \left (c\right ) + 1296 \, b d^{3} n r^{3} x^{3} \log \left (x\right ) + 120 \, b n r^{4} x^{3} x^{3 \, r} e^{3} \log \left (x\right ) + 1836 \, b d n r^{3} x^{3} x^{2 \, r} e^{2} \log \left (x\right ) + 3807 \, b d^{2} n r^{2} x^{3} x^{r} e \log \left (x\right ) - 432 \, b d^{3} n r^{3} x^{3} + 579 \, a d^{3} r^{4} x^{3} - 4 \, b n r^{4} x^{3} x^{3 \, r} e^{3} + 12 \, a r^{5} x^{3} x^{3 \, r} e^{3} - 216 \, b d n r^{3} x^{3} x^{2 \, r} e^{2} + 513 \, a d r^{4} x^{3} x^{2 \, r} e^{2} - 999 \, b d^{2} n r^{2} x^{3} x^{r} e + 2619 \, a d^{2} r^{3} x^{3} x^{r} e + 1296 \, b d^{3} r^{3} x^{3} \log \left (c\right ) + 120 \, b r^{4} x^{3} x^{3 \, r} e^{3} \log \left (c\right ) + 1836 \, b d r^{3} x^{3} x^{2 \, r} e^{2} \log \left (c\right ) + 3807 \, b d^{2} r^{2} x^{3} x^{r} e \log \left (c\right ) + 1566 \, b d^{3} n r^{2} x^{3} \log \left (x\right ) + 459 \, b n r^{3} x^{3} x^{3 \, r} e^{3} \log \left (x\right ) + 3078 \, b d n r^{2} x^{3} x^{2 \, r} e^{2} \log \left (x\right ) + 2673 \, b d^{2} n r x^{3} x^{r} e \log \left (x\right ) - 522 \, b d^{3} n r^{2} x^{3} + 1296 \, a d^{3} r^{3} x^{3} - 36 \, b n r^{3} x^{3} x^{3 \, r} e^{3} + 120 \, a r^{4} x^{3} x^{3 \, r} e^{3} - 594 \, b d n r^{2} x^{3} x^{2 \, r} e^{2} + 1836 \, a d r^{3} x^{3} x^{2 \, r} e^{2} - 810 \, b d^{2} n r x^{3} x^{r} e + 3807 \, a d^{2} r^{2} x^{3} x^{r} e + 1566 \, b d^{3} r^{2} x^{3} \log \left (c\right ) + 459 \, b r^{3} x^{3} x^{3 \, r} e^{3} \log \left (c\right ) + 3078 \, b d r^{2} x^{3} x^{2 \, r} e^{2} \log \left (c\right ) + 2673 \, b d^{2} r x^{3} x^{r} e \log \left (c\right ) + 972 \, b d^{3} n r x^{3} \log \left (x\right ) + 837 \, b n r^{2} x^{3} x^{3 \, r} e^{3} \log \left (x\right ) + 2430 \, b d n r x^{3} x^{2 \, r} e^{2} \log \left (x\right ) + 729 \, b d^{2} n x^{3} x^{r} e \log \left (x\right ) - 324 \, b d^{3} n r x^{3} + 1566 \, a d^{3} r^{2} x^{3} - 117 \, b n r^{2} x^{3} x^{3 \, r} e^{3} + 459 \, a r^{3} x^{3} x^{3 \, r} e^{3} - 648 \, b d n r x^{3} x^{2 \, r} e^{2} + 3078 \, a d r^{2} x^{3} x^{2 \, r} e^{2} - 243 \, b d^{2} n x^{3} x^{r} e + 2673 \, a d^{2} r x^{3} x^{r} e + 972 \, b d^{3} r x^{3} \log \left (c\right ) + 837 \, b r^{2} x^{3} x^{3 \, r} e^{3} \log \left (c\right ) + 2430 \, b d r x^{3} x^{2 \, r} e^{2} \log \left (c\right ) + 729 \, b d^{2} x^{3} x^{r} e \log \left (c\right ) + 243 \, b d^{3} n x^{3} \log \left (x\right ) + 729 \, b n r x^{3} x^{3 \, r} e^{3} \log \left (x\right ) + 729 \, b d n x^{3} x^{2 \, r} e^{2} \log \left (x\right ) - 81 \, b d^{3} n x^{3} + 972 \, a d^{3} r x^{3} - 162 \, b n r x^{3} x^{3 \, r} e^{3} + 837 \, a r^{2} x^{3} x^{3 \, r} e^{3} - 243 \, b d n x^{3} x^{2 \, r} e^{2} + 2430 \, a d r x^{3} x^{2 \, r} e^{2} + 729 \, a d^{2} x^{3} x^{r} e + 243 \, b d^{3} x^{3} \log \left (c\right ) + 729 \, b r x^{3} x^{3 \, r} e^{3} \log \left (c\right ) + 729 \, b d x^{3} x^{2 \, r} e^{2} \log \left (c\right ) + 243 \, b n x^{3} x^{3 \, r} e^{3} \log \left (x\right ) + 243 \, a d^{3} x^{3} - 81 \, b n x^{3} x^{3 \, r} e^{3} + 729 \, a r x^{3} x^{3 \, r} e^{3} + 729 \, a d x^{3} x^{2 \, r} e^{2} + 243 \, b x^{3} x^{3 \, r} e^{3} \log \left (c\right ) + 243 \, a x^{3} x^{3 \, r} e^{3}}{9 \, {\left (4 \, r^{6} + 44 \, r^{5} + 193 \, r^{4} + 432 \, r^{3} + 522 \, r^{2} + 324 \, r + 81\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d+e*x^r)^3*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

1/9*(12*b*d^3*n*r^6*x^3*log(x) + 108*b*d^2*n*r^5*x^3*x^r*e*log(x) - 4*b*d^3*n*r^6*x^3 + 12*b*d^3*r^6*x^3*log(c
) + 108*b*d^2*r^5*x^3*x^r*e*log(c) + 132*b*d^3*n*r^5*x^3*log(x) + 54*b*d*n*r^5*x^3*x^(2*r)*e^2*log(x) + 864*b*
d^2*n*r^4*x^3*x^r*e*log(x) - 44*b*d^3*n*r^5*x^3 + 12*a*d^3*r^6*x^3 - 108*b*d^2*n*r^4*x^3*x^r*e + 108*a*d^2*r^5
*x^3*x^r*e + 132*b*d^3*r^5*x^3*log(c) + 54*b*d*r^5*x^3*x^(2*r)*e^2*log(c) + 864*b*d^2*r^4*x^3*x^r*e*log(c) + 5
79*b*d^3*n*r^4*x^3*log(x) + 12*b*n*r^5*x^3*x^(3*r)*e^3*log(x) + 513*b*d*n*r^4*x^3*x^(2*r)*e^2*log(x) + 2619*b*
d^2*n*r^3*x^3*x^r*e*log(x) - 193*b*d^3*n*r^4*x^3 + 132*a*d^3*r^5*x^3 - 27*b*d*n*r^4*x^3*x^(2*r)*e^2 + 54*a*d*r
^5*x^3*x^(2*r)*e^2 - 540*b*d^2*n*r^3*x^3*x^r*e + 864*a*d^2*r^4*x^3*x^r*e + 579*b*d^3*r^4*x^3*log(c) + 12*b*r^5
*x^3*x^(3*r)*e^3*log(c) + 513*b*d*r^4*x^3*x^(2*r)*e^2*log(c) + 2619*b*d^2*r^3*x^3*x^r*e*log(c) + 1296*b*d^3*n*
r^3*x^3*log(x) + 120*b*n*r^4*x^3*x^(3*r)*e^3*log(x) + 1836*b*d*n*r^3*x^3*x^(2*r)*e^2*log(x) + 3807*b*d^2*n*r^2
*x^3*x^r*e*log(x) - 432*b*d^3*n*r^3*x^3 + 579*a*d^3*r^4*x^3 - 4*b*n*r^4*x^3*x^(3*r)*e^3 + 12*a*r^5*x^3*x^(3*r)
*e^3 - 216*b*d*n*r^3*x^3*x^(2*r)*e^2 + 513*a*d*r^4*x^3*x^(2*r)*e^2 - 999*b*d^2*n*r^2*x^3*x^r*e + 2619*a*d^2*r^
3*x^3*x^r*e + 1296*b*d^3*r^3*x^3*log(c) + 120*b*r^4*x^3*x^(3*r)*e^3*log(c) + 1836*b*d*r^3*x^3*x^(2*r)*e^2*log(
c) + 3807*b*d^2*r^2*x^3*x^r*e*log(c) + 1566*b*d^3*n*r^2*x^3*log(x) + 459*b*n*r^3*x^3*x^(3*r)*e^3*log(x) + 3078
*b*d*n*r^2*x^3*x^(2*r)*e^2*log(x) + 2673*b*d^2*n*r*x^3*x^r*e*log(x) - 522*b*d^3*n*r^2*x^3 + 1296*a*d^3*r^3*x^3
 - 36*b*n*r^3*x^3*x^(3*r)*e^3 + 120*a*r^4*x^3*x^(3*r)*e^3 - 594*b*d*n*r^2*x^3*x^(2*r)*e^2 + 1836*a*d*r^3*x^3*x
^(2*r)*e^2 - 810*b*d^2*n*r*x^3*x^r*e + 3807*a*d^2*r^2*x^3*x^r*e + 1566*b*d^3*r^2*x^3*log(c) + 459*b*r^3*x^3*x^
(3*r)*e^3*log(c) + 3078*b*d*r^2*x^3*x^(2*r)*e^2*log(c) + 2673*b*d^2*r*x^3*x^r*e*log(c) + 972*b*d^3*n*r*x^3*log
(x) + 837*b*n*r^2*x^3*x^(3*r)*e^3*log(x) + 2430*b*d*n*r*x^3*x^(2*r)*e^2*log(x) + 729*b*d^2*n*x^3*x^r*e*log(x)
- 324*b*d^3*n*r*x^3 + 1566*a*d^3*r^2*x^3 - 117*b*n*r^2*x^3*x^(3*r)*e^3 + 459*a*r^3*x^3*x^(3*r)*e^3 - 648*b*d*n
*r*x^3*x^(2*r)*e^2 + 3078*a*d*r^2*x^3*x^(2*r)*e^2 - 243*b*d^2*n*x^3*x^r*e + 2673*a*d^2*r*x^3*x^r*e + 972*b*d^3
*r*x^3*log(c) + 837*b*r^2*x^3*x^(3*r)*e^3*log(c) + 2430*b*d*r*x^3*x^(2*r)*e^2*log(c) + 729*b*d^2*x^3*x^r*e*log
(c) + 243*b*d^3*n*x^3*log(x) + 729*b*n*r*x^3*x^(3*r)*e^3*log(x) + 729*b*d*n*x^3*x^(2*r)*e^2*log(x) - 81*b*d^3*
n*x^3 + 972*a*d^3*r*x^3 - 162*b*n*r*x^3*x^(3*r)*e^3 + 837*a*r^2*x^3*x^(3*r)*e^3 - 243*b*d*n*x^3*x^(2*r)*e^2 +
2430*a*d*r*x^3*x^(2*r)*e^2 + 729*a*d^2*x^3*x^r*e + 243*b*d^3*x^3*log(c) + 729*b*r*x^3*x^(3*r)*e^3*log(c) + 729
*b*d*x^3*x^(2*r)*e^2*log(c) + 243*b*n*x^3*x^(3*r)*e^3*log(x) + 243*a*d^3*x^3 - 81*b*n*x^3*x^(3*r)*e^3 + 729*a*
r*x^3*x^(3*r)*e^3 + 729*a*d*x^3*x^(2*r)*e^2 + 243*b*x^3*x^(3*r)*e^3*log(c) + 243*a*x^3*x^(3*r)*e^3)/(4*r^6 + 4
4*r^5 + 193*r^4 + 432*r^3 + 522*r^2 + 324*r + 81)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^2\,{\left (d+e\,x^r\right )}^3\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(d + e*x^r)^3*(a + b*log(c*x^n)),x)

[Out]

int(x^2*(d + e*x^r)^3*(a + b*log(c*x^n)), x)

________________________________________________________________________________________